package com.example.demo.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 何景航
 * @date 2025/3/10 11:19
 */
@RestController
public class ClueController {
    @RequestMapping(value = "/api/clue/index")
    public String clueIndex(){
        return "clueIndex";
    }

    @RequestMapping(value = "/api/clue/menu")
    public String clueMenu(){
        return "clueMenu";
    }

    @RequestMapping(value = "/api/clue/menu/child")
    public String clueMenuChild(){
        return "clueMenuChild";
    }
    @PreAuthorize(value = "hasAuthority('clue:list')")
    @RequestMapping(value = "/api/clue/list")
    public String clueList(){
        return "clueList";
    }
    @PreAuthorize(value = "hasAuthority('clue:add')")
    @RequestMapping(value = "/api/clue/input")
    public String clueInput(){
        return "clueInput";
    }
    @PreAuthorize(value = "hasAuthority('clue:edit')")
    @RequestMapping(value = "/api/clue/edit")
    public String clueEdit(){
        return "clueEdit";
    }
    @PreAuthorize(value = "hasAuthority('clue:view')")
    @RequestMapping(value = "/api/clue/view")
    public String clueView(){
        return "clueView";
    }
    @PreAuthorize(value = "hasAuthority('clue:del')")
    @RequestMapping(value = "/api/clue/del")
    public String clueDel(){
        return "clueDel";
    }
    @PreAuthorize(value = "hasAnyAuthority('clue:export','clue:download')")
    @RequestMapping(value = "/api/clue/export")
    public String clueExport(){
        return "clueExport";
    }
}
